package com.jjq.movebooking.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jjq.movebooking.entity.MoveBooking;
import com.jjq.movebooking.entity.User;
import com.jjq.movebooking.mapper.UserMapper;
import com.jjq.movebooking.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class UserController {

    @RequestMapping("/login")
    public String login(){
        return "login";
    }

    @RequestMapping("/loginView")
    public String login(User user, Model model) {
        if(user.getUserName().equals("Future") && user.getPassword().equals("1395177949")){
            model.addAttribute("user",user);
            return "redirect:AllList";
        }else{

            return "login";
        }


    }

}
